package com.uu.platform.common;
import java.util.*;

/**
 * Token配置
 * @author cmt
 * 常量类
 */
public class Constant {

    /**
     * 验证码过期时间 此处为五分钟
     */
    public static final Integer CODE_EXPIRE_TIME = 60 * 5;

    /**
     * jwtToken过期时间 默认为30天
     * public static Integer TOKEN_EXPIRE_TIME = 7 * 24 * 60 * 60 * 1000;
     */
    //public static final Long TOKEN_EXPIRE_TIME = 31 * 24 * 60 * 60 * 1000L;
    public static Integer TOKEN_EXPIRE_TIME = 7 * 24 * 60 * 60 * 1000;

    /**
     * UserId
     */
    public static final String USER_ID = "userId";


    /**
     * token请求头名称
     */
    public static final String TOKEN_HEADER_NAME = "token";

    /*做token签名的字符串*/
    public static final String TOKEN_SECRET="5dslb2d1b564w1gbs3b5241b3r54w3g3sdg23gv1";

    //token的载荷中盛放的信息 只盛放一个userId 其余什么也不再盛放
    public static final String TOKEN_CLAIM="sn";

    //充电结束原因
    public static final Map END_REASON_MAP = new HashMap(){{
        put("0","其他");
        put("1","设备无小区");
        put("2","小区功率超限");
        put("3","设备计费功率超限");
        put("4","余额用完");
        put("5","充电时长（或月卡）用完");
        put("6","计费设置有误");
        put("7","软件充满自停");
        put("8","充电时长过长");
        put("9","离线超时停止");
        put("20","手动停止");
        put("21","运营商停止");
        put("22","漫游充电实付账户余额不足");
        put("-30","主板关闭");
        put("-41","空载关闭");
        put("-42","设备充满关闭");
        put("-43","过载关闭");
        put("-44","后台关闭");
        put("-45","继电器粘连");
        put("-46","设备电源线温度过高");
        put("-47","通道故障");
        put("-48","超时关闭");
        put("-50","其他");

    }};

    //设备类型 充电桩类型，1整机，2汽车，3电川模块，4久恒模块，5柏来
    public static final Map STATION_TYPE_MAP = new HashMap(){{
        put("0","");
        put("1","整机");
        put("2","汽车");
        put("3","电川模块");
        put("4","久恒模块");
        put("5","柏来");
    }};

    //运营商收益明细类型operatorProfit
    //1用户充值、2用户消费、3 虚拟充值 4 余额清零 5 用户退款 6余额转让 7新会员赠送、8漫游充电、9用户退款、11购买套餐、12安心扣款、13安心收益、14提现、15设备续费
    public static final Map OPERATOR_PROFIT_SCENE = new HashMap(){{
        put("0","全部交易类型");
        put("1","用户充值");
        put("2","用户消费");
        put("5","用户退款");
        put("8","漫游充电");
        put("11","购买套餐");
        put("12","安心扣款");
        put("13","安心收益");
        put("14","提现");
        put("15","提现手续费");
        put("16","流量卡续费");
        //put("21","广告收益");
    }};


    //设备离线时长（设备N毫秒不通信则为离线）
    public static final long STATION_TIMOUT = 300000;


    //新增权限后，高级管理自动增添权限ID
    public static  final int PERMISSION_GRADE = 4;

    //每页条数
    public static final int MEMBER_PAGE_SIZE=20;

    //设备在线判断
    public static final int STATION_ONLINE_JUDGE=15;

    //时区
    public static  final String TIME_ZONE = "GMT+8:00";
}
